import { getToken, setToken, removeToken } from '@/utils/auth'
const state = {
  token: getToken()
}

const mutations = {
  setToken(state, token) {
    state.token = token
    setToken(token)
  },
  removeToken(state) {
    state.token = null
    removeToken()
  }
}
const actions = {
  login(context) {
    context.commit('setToken', 212)
  }
}
const getters = {
}
export default {
  state,
  mutations,
  actions,
  getters,
  namespaced: true
}
